#ifndef COMMUNICATION_H_INCLUDE
#define COMMUNICATION_H_INCLUDE

#include "string.h"

#define DOWNLOAD_BAUD 921600 //460800 // 115200;230400,460800,921600


typedef enum _STEP_STATUS
{
	StepStart,
	StepWorking,
	StepPass,
	StepFail,
}StepStatus;

int down_percent(void* szStep,StepStatus status,  int nCurPos, int nLen);

int set_m1190_power(int on);

int set_m7281_power(int on);

int open_com(char *dev);

int write_com_m7281(char *buffer, int len);

int write_com_m1190(char *buffer, int len);

int read_com(char *buffer, int len , int time);

int scom_change_baud(int baud);

int close_com();

#endif
